home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PROGEDIT
/
3458B.ZIP
/
AMAC44B.ZIP
/
TIM004.QM
< prev
next >
Wrap
Text File
|
1991-08-03
|
12KB
|
238 lines
* TIM004.QM
* Written By Tom Hogshead
* [ See TIMERxx.QM For Use ]
* August 2, 1991
* Key Subfile
* ===== ========= =====================================================
* @(r) --Times Macro Command Sequences For 1 To 100,000 Repeats
* Using [Cursor_Right] Timing Counter
* {e:\up\TIMER14}--Return To TIMERxx.QM
*
*-- eoi
*
* -------------------------------------------------------------------------
* @(r) Times Macro Command Sequences For 1 To 100,000 Repeats
* 435 bytes Sat 07-13-1991 00:34:22 (TH @r, cursorright counter)
* -------------------------------------------------------------------------
* This version is a modification of @1 that uses [ Cursor_Right ] as
* the counting character instead of [ Del_Ch ] thereby reducing the
* need for block filling. It is included here as an example of another
* timing technique only.
* @r Base Time for 100k repeats is 227 seconds, about 10% less than @1
* Base Time of 252 seconds:
* * 11:05:50 09:37 07-14-91 @r 100k 002
* * 11:02:02 05:49 07-14-91 @r 100k 001
* 180
* 49
* -----
* 229
* -2
* -----
* 227 seconds, @r 100k Base Time, no counting characters
* No counting characters are used in @r as timed above. Hovever, the
* effect on timing by displaying counting charcters, even though they
* are not needed in @r, can be seen by commenting the line "jump L5:";
* then Base Time for 100k repeats more than doubles to 479 seconds:
* * 11:15:57 23:56 07-14-91 @r 100k 001
* 480
* 56
* -----
* 536
* -57
* -----
* 479 seconds, @r 100k Base Time, counting characters
@r macrobegin
unmarkblock defaultwordset
setrmargin "80" return * For timer messages on same line
insertline begline dropanchor
currentfilename copy * Save currentfilename to return to
gotocolumn "41" return
dropanchor begline
fillblock "*" return * Insert start line
editfile "0k" return quit *
editfile return
"Cycle [Y=yes, Enter=no] ?" * Y for yes, Enter for one cycle only
cursorright dropanchor
Pause
*---------------------------------------------------------------- *
* Buffer Description *
* ======== =================================================== *
* 1 - [Y] or [y] to cycle, [Enter] for only one cycle *
* 2 - Size = no of repeats to time, eg 1k = 1000 repeats *
* 3 - # of lines of counting characters *
* 4 - # of counting characters per counting line *
* 5 - Character after buff 4 (* for 1/5/50/100 repeats) *
*---------------------------------------------------------------- *
storescrbuff "1" return * Y, or Enter for one cycle only
delline * Delete message line
editfile "$repeat" return
Pause
delrtword * Delete empty space
markcharacter *
gotocolumn "7" return * Mark Size
storescrbuff "2" return * Size
wordright *
markword *
storescrbuff "3" return * # of AddLines
wordright markword *
storescrbuff "4" return * Chars per line to delete
gotoblockend *
unmarkblock *
cursorright * Move to empty space
markcharacter * Start mark
endline * Mark buff 5
storescrbuff "5" return * Store buff 5, blank if nothing
quit * Quit $repeat
editfile "$line#" return quit * Quit $line# if loaded
editfile paste return * Return to file we started in
onewindow
*--------------------------------------------------------*
* Window File Description *
* ====== ====== ==================================== *
* 1 File to record timing record *
* 2 0k Zero length file to count repeats *
* 3 $line# contains 001-999 for cycle counting *
*--------------------------------------------------------*
horizontalwindow * 0k window
editfile "0k" return
shrinkwindow
cursordown cursordown cursordown
cursordown cursordown cursordown
escape
horizontalwindow * Cycle # window
editfile "$line#" return
endline cursorright cursorright
*-- InsertTime in $line#
inserttime * Insert approx start time in $line#
getscrbuff "2" return * Insert size selected
unmarkblock
prevwindow * 0k window
CYCLE:
getscrbuff "3" return * Get # of addlines
cut
begline *
getscrbuff "5" return * Get buff 5
endline * Test if buff 5 has text
jfalse L1: * If false, buff 5 has no text
delline *ELSE buff has text
getscrbuff "4" return * Get # of chars/line to count
cut * Cut to scrap
begfile *
markcolumn *
gotocolumn paste return * Go to end of block
fillblock "*" return * Fill with stars
delch * Delete one counting char
* because delch "fail"= 1 rpt
* Pause * Add to see # of repeats - 1
* eg, 4 stars = 5 repeats
jump REFILL: *
L1: *
delline * Delete extra line from buff 5
addline *
repeatcmd paste return * Add lines for counting block
getscrbuff "4" return * Get # of chars/line to count
cut * Cut to scrap
cursorup cursorup * Move up to buff #4 line #
jump L5: * Bypass block filling |b
L2: gotocolumn paste return * Go to end of block
cursorleft * Position cursor one column
* left of # of counting chars
* because delch "fail"= 1 rpt
markcolumn begfile * Mark block end/begin
* L3: fillblock "*" return jump REFILL: * Count w/ all stars, for tests
* L4: fillblock " " return jump REFILL: * Empty block, for tests
fillblock #248 return * °°°°°°°°°
gotocolumn "101" return fillblock #007 return *
gotocolumn "201" return fillblock #249 return * ∙∙∙∙∙∙∙∙∙
gotocolumn "301" return fillblock #250 return * ·········
gotocolumn "401" return fillblock "." return * .........
REFILL:
unmarkblock
endpara begline
L5: * |b
prevwindow * Timing record window
makectrofscreen
insertline begline
"*" gotocolumn "41" return "*" * Insert starting line of stars
*-------------------------------------------------------------------*
* My DiskPark TSR parks my hard disk after 9 minutes of no access. *
* I don't want TSR timing interference for > 9 minutes cycling. *
* Add these 6 lines if you have TSR disk access during cycling. *
*-------------------------------------------------------------------*
* getscrbuff "1" return * *
* endline * Test if 'y' to cycle *
* jfalse NOSAVE_FILE: * If false, are at eol, don't save *
* savefile *ELSE save file *
* NOSAVE_FILE: * *
* cut * Remove buffer 1 from screen *
*-------------------------------------------------------------------*
cursorright
* ■■■■■ Timing Starts Here ■■■■■
Insert_Time
nextwindow * 0k window
GOTOCOLUMN "13" return * |b
TIME:*
* **** < Commands to Time Inserted Here> ****
Cursor_Right * Timing counter |b
jtrue TIME:
prevwindow * Timing record window
gotocolumn "53" return
* 500_TIME: insertline * Add to show time after counting line
deltoeol * Delete previous time
Insert_Time
* ■■■■■ Timing Ends Here ■■■■■
prevposition * Move to first char of time
delrtword delch * Delete 'Hour:'
nextwindow * 0k window
* begline * In case inserted commands move cur
GOTOCOLUMN "13" return * Start counting in col 13 |b
cursorup * Move up to next counting line
jtrue TIME: * until no more lines to count
nextwindow * Cycle # window
begline markword
copy * Copy current cycle # for timer
wordright
markcolumn endline markcolumn
gotoblockbeg cursordown
moveblock * Move start Time/Size to next line
unmarkblock
begline scrolldown
nextwindow * Timing record window
endline cursorright cursorright
insertdate * Insertdate
wordleft delch delch * Delete 91
wordleft wordleft wordleft
delrtword * Delete day of week
endline cursorright "@r" * Insert macro key
cursorright *
getscrbuff "2" return * Insert size
gotocolumn "77" return *
paste * Insert current cycle #
unmarkblock
nextwindow * 0k window
BEGLINE * Repostition cursor for cycle test |b
getscrbuff "1" return * Get answer to cycle prompt
endline * Test if answered 'y' to cycle
jtrue CYCLE: * If true, are at eol, cycle again
prevwindow * Timing record window
dropanchor * Mark timer to return to
prevwindow * Cycle number window
quit * Quit $line#
editfile "0k" return quit * Quit 0k
gotoblockbeg unmarkblock * Return to file we started in
onewindow * Close all windows
begline cursorright cursorright * Position cursor to calculate time
*
* 380 bytes Mon 06-17-1991 21:41:37 (TH @1)
* 380 bytes Fri 06-28-1991 07:26:45 (TH @1)
* 419 bytes Sun 07-07-1991 13:56:04 (TH @1, added 1/5/50/100 repeats)
* 435 bytes Sat 07-13-1991 00:34:22 (TH @r, cursorright counter |b)